//
//  k_const.h
//  kratos_framework
//
//  Created by 7yao.top on 2018/10/23.
//  Copyright © 2018年 kratos_framework. All rights reserved.
//


#ifndef k_const_h
#define k_const_h
#import "UIImage+kkkk_LoadBundleImage.h"
#import "Kratos_Tool.h"
#import "Masonry.h"
#import <UIKit/UIKit.h>

#import "UIView+Toast.h"
#define  inputH  [UIScreen mainScreen].bounds.size.height * 0.11
#define UIDeviceOrientationIsPortrait(orientation)  ((orientation) == UIDeviceOrientationPortrait || (orientation) == UIDeviceOrientationPortraitUpsideDown)
#define UIDeviceOrientationIsLandscape(orientation) ((orientation) == UIDeviceOrientationLandscapeLeft || (orientation) == UIDeviceOrientationLandscapeRight)





#define kaccountViewW 320

///保存DataEyeInit借口返回Data数据的key
#define kUserDefaultDataEyeKey @"kUserDefaultDataEyeKey"
///保存支付切换返回Data的数据的Key
#define kUserDefaultFuHuan @"kUserDefaultFuHuan"
///修改 如未绑定手机号,请联系客服QQ:3004505212 背景颜色
#define kbandingLabelBackgroundColor  [UIColor redColor]

//相册AlbumName
#define kAlbumName @"kAlbumName"

///苹果内购支付完成到账URL,每个包都是更改

#ifdef DEBUG
//#define kURL  @"http://test.lzgame.top"
#define kURL @"http://preios_28_1.luckystar001.top"
#define kNEWURL  @"http://apiios.luckystar001.top"
#else
#define kURL @"https://game.lzgame.top"
#define kNEWURL  @"https://api.lzgame.top"
#endif


#define  Portraitlayout   __strong __typeof(weakSelf)strongSelf = weakSelf; \
make.width.mas_equalTo(kaccountViewW); \
make.height.equalTo(self.view.mas_width).multipliedBy(0.8); \
make.center.mas_equalTo(strongSelf.view);

#define Landscapelayout  __strong __typeof(weakSelf)strongSelf = weakSelf; \
make.width.mas_equalTo(kaccountViewW); \
make.height.equalTo(self.view.mas_height).multipliedBy(0.8); \
make.center.equalTo(strongSelf.view);





#define layoutView(view)      if ([[UIDevice currentDevice] orientation] == UIDeviceOrientationPortrait) { \
__weak typeof(self)  weakSelf = self; \
[(view) mas_remakeConstraints :^(MASConstraintMaker *make) { \
    Landscapelayout \
}];\
} else if ([[UIDevice currentDevice] orientation] == UIDeviceOrientationLandscapeLeft || [[UIDevice currentDevice]  orientation] == UIDeviceOrientationLandscapeRight) { \
    __weak typeof(self)  weakSelf = self; \
    [(view) mas_remakeConstraints:^(MASConstraintMaker *make) { \
        Landscapelayout \
    }]; \
}else if ([[UIDevice currentDevice]orientation] == UIDeviceOrientationPortraitUpsideDown ) { \
    __weak typeof(self)  weakSelf = self; \
    [(view) mas_remakeConstraints :^(MASConstraintMaker *make) { \
        Landscapelayout \
    }]; \
}else if ([[UIDevice currentDevice]orientation] == UIDeviceOrientationFaceUp) \
{ \
    __weak typeof(self)  weakSelf = self; \
    [(view) mas_remakeConstraints :^(MASConstraintMaker *make) { \
        Landscapelayout \
    }]; \
}else \
{ \
__weak typeof(self)  weakSelf = self; \
[(view) mas_remakeConstraints :^(MASConstraintMaker *make) { \
Landscapelayout \
}]; \
}



#ifdef DEBUG
#define kLog(FORMAT, ...) fprintf(stderr,"%s:%d\t%s\n",[[[NSString stringWithUTF8String:__FILE__] lastPathComponent] UTF8String], __LINE__, [[NSString stringWithFormat:FORMAT, ##__VA_ARGS__] UTF8String]);
#else
#define kLog(...)
#endif








#endif /* k_const_h */
